﻿using BusinessLayer.VDataEntities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TrialManagmentTool.Models
{
    public class TrialViewModel
    {
        public string Promoter { get; set; }
        public string City { get; set; }
        public string Operation { get; set; }
        public long ID { get; set; }
        public long PromoterID { get; set; }
        public long CityID { get; set; }
        public string PromoterUserName { get; set; }
    }

    public class TrialAssaginModel
    {
        public VTrialGuide vTrialGuide { get; set; }
        public List<PromoterCity> trialCandidateList { get; set; }
        //public VTrialCandidate[] trialCandidateList { get; set; }
        public long adminID { get; set; }
        public long projectCategoryID { get; set; }
        public string ca { get; set; }
        public string fsm { get; set; }
    }

    public class PromoterCity
    {
        public long PromoterID { get; set; }
        public long ProvinceID { get; set; }
        public string PromoterUserName { get; set; }
    }

    public class TrialBasicInfo
    {
        public VTrialBasicInfo basicInfo { get; set; }
        public NewTrialInfo trialInfo { get; set; }
    }

    public class NewTrialInfo
    {
        public long cropID { get; set; }
        public string cropName { get; set; }
        public long productID { get; set; }
        public string productName { get; set; }
        public long provinceID { get; set; }
        public long promoterID { get; set; }
    }

    public class ReportInputModel
    {
        public List<VInputData> inputData { get; set; }
        public string comment { get; set; }
        public long reportid { get; set; }
        public List<ImageSource> imagesource { get; set; }
        public List<ImageSource> imagedelete { get; set; }
    }

    public class DynamicInput
    {
        public long id { get; set; }
        public string value { get; set; }
    }
    public class ImageSource
    {
        public string stringsource { get; set; }
    }

    public class TrialDetailViewModel
    {
        public VTrialDetail trial { get; set; }
        public VTrialGuide trialGuide { get; set; }
        public bool isShowEditButton { get; set; }
        public bool isExistTrialInfo { get; set; }
        public bool isExistBasicInfo { get; set; }
        public bool isExistTrialGuide { get; set; }
        public bool isExistTTM { get; set; }
        public bool isExistProjectCategory { get; set; }
        public long TTMID { get; set; }
        public long ProjectCategoryID { get; set; }
        public string CreateDateTime { get; set; }
        public string SubmitDateTime { get; set; }
        public string FinishDateTime { get; set; }
        public string LastObserveDateTime { get; set; }
        public List<DynamicInfoSummary> BasicInfoList { get; set; }
        //final Report
        public List<ProcessViewModel> ProcessViewModelDataList { get; set; }
    }
    public class ProcessViewModel
    {
        public string reportName { get; set; }
        public List<VReport> ObserveDataList { get; set; }
        public List<VReport> NonObserveDataList { get; set; }
    }

    //Trial/总结报告填写信息
    public class TrialBasicSummaryViewModel
    {
        public List<DynamicInfoSummary> dataList { get; set; }
        public List<FinalReportDesc> reportDescList { get; set; }
        public long ID { get; set; }
        public int TrialStatus { get; set; }
        public long TrialGuideID { get; set; }
    }
    public class FinalReportDesc
    {
        public int ID { get; set; }
        public string Description { get; set; }
    }
    public class DynamicInfoSummary
    {
        public string name { get; set; }
        public string value { get; set; }
        public bool display { get; set; }
        public bool isMandary { get; set; }
        public string ChineseDesc { get; set; }
    }

    public class DynamicMainInfo
    {
        public VTrialBasicInfo basicInfo { get; set; }
        public long ID { get; set; }
    }

    public class ReportViewModel
    {
        public List<DynamicInfoSummary> dataList { get; set; }
        public VTrialDetail trialDetail { get; set; }
        //new
        public List<TrialProcess> trialProcessList { get; set; }
        public string title { get; set; }
    }

    public class FinalSummarySubmitModel
    {
        public long TrialID { get; set; }
        public DateTime LastObserveDate { get; set; }
        public bool IsAcceptable { get; set; }
        public string EffectResult { get; set; }
        public string EffectDescription { get; set; }
        public string CropDescription { get; set; }
        public string YieldsEffert { get; set; }
        public string Comments { get; set; }

    }

    public class TrialProcess
    {
        public long ID { get; set; }
        public string processName { get; set; }
    }

    public class TrialInfo
    {
        public long TrialID { get; set; }
        public long TTMID { get; set; }
        public string FSM { get; set; }
        public string CA { get; set; }
        public long ProjectCategoryID { get; set; }
    }

    public class TrialExportModel
    {
        public VTrialDetail trial { get; set; }
        public VTrialSite trialSite { get; set; }
        public List<VReport> guanchaList { get; set; }
        public List<VReport> yongyaoList { get; set; }
        public int sheetPage { get; set; }
        public int rowIndex { get; set; }
        public string productCategory { get; set; }
        public string reportName { get; set; }
        public long PromoterTrialIndex { get; set; }
    }
}